function getRootPath() {
    var curPageUrl = window.document.location.href;
    var rootPath = curPageUrl.split("//")[0] + curPageUrl.split("//")[1].split("/")[0]
        + "/" + curPageUrl.split("//")[1].split("/")[1];
    return rootPath;
}
